import request from '@/utils/request'

export default {
    //1 讲师列表（条件查询分页）
    getTeacherListPage(current,limit,teacherQueryVo) {
        return request({
            // url: '/table/list/' + current + "/" + limit,
            url: `/eduservice/teacher/pageTeacherCondition/${current}/${limit}`,
            method: 'POST',
            //teacherQueryVo条件对象，后端使用RequestBody来获取数据
            data: teacherQueryVo
          })
    },
	//删除讲师
	deleteTeacherId(id) {
		return request({
			url: `/eduservice/teacher/${id}`,
			method: "DELETE"
		})
	},
	//添加讲师
	addTeacher(teacher) {
		return request({
			url: `/eduservice/teacher/addTeacher`,
			method: 'POST',
			data: teacher
		})
	},
	//根据id查询讲师信息
	getTeacherInfo(id) {
		return request({
			url: `/eduservice/teacher/getTeacher/${id}`,
			method: 'GET'
		}) 
	},
	//修改讲师的信息
	updateTeacherInfo(teacher) {
		return request({
			url: `/eduservice/teacher/updateTeacher`,
			method: 'PUT',
			data: teacher
		})
	}
}
